<template>
  <div class="mod-config">
    <table-view ref="view"
                :searchAttrs="searchAttrs"
                :primaryKey="primaryKey"
                :listApiName="listApiName"
                :deleteApiName="deleteApiName"
                :exportApiName="exportApiName"
                :saveAuthName="saveAuthName"
                :deleteAuthName="deleteAuthName"
                :showAttrs="showAttrs"
    >
    </table-view>
    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  </div>
</template>


<script>
import tableView from '@/components/tableView'
import basicMixins from '@/utils/commonViewMixins'
import AddOrUpdate from './purchaseinquiryinfomanage-add-or-update'

export default {
  mixins: [basicMixins],
  data() {
    return {
      primaryKey: 'id',
      listApiName: 'purchaseApi/listPurchaseInquiryInfoManage',
      deleteApiName: 'purchaseApi/deletePurchaseInquiryInfoManage',
      exportApiName: 'purchaseApi/getPurchaseInquiryInfoManageExport',
      saveAuthName: 'purchase:purchaseinquiryinfomanage:save',
      deleteAuthName: 'purchase:purchaseinquiryinfomanage:delete',
      searchAttrs: {
        clientContractNo: {
          label: '合同编号',
          placeholder: '请输入合同编号',
        },
        productNo: {
          label: '产品名称',
          placeholder: '请输入产品名称',
        },
        dateTimeRange: {
          type: 'date',
          dateType: 'daterange',
          clearable: true
        }
      },
      showAttrs: {
        clientContractNo: {
          label: '客户合同编号',
          width: 150
        },
        productNo: {
          label: '产品名称',
          width: 150
        },
        supplierName: {
          label: '询价供应商',
          width: 150
        },
        supplierProductNo:{
          label: '供应商产品编号'
        },
        recommendSupplierName: {
          label: '确定供应商',
          width: 150
        },
        orderUnitPrice: {
          label: '订单总单价',
          showAuthName: 'order:unitprice:show'
        },
        clientModelAmount: {
          label: '客户开模费用',
          showAuthName: 'order:unitprice:show'

        },
        clientProofingAmount: {
          label: '客户打样费用',
          showAuthName: 'order:unitprice:show'

        },
        clientTotalAmount: {
          label: '客户订单总价',
          showAuthName: 'order:unitprice:show'

        },
        // clientCurrencyType: {
        //   label: '币种'
        // },
        supplierUnitPrice: {
          label: '供应商单价',

        },
        supplierModelAmount: {
          label: '供应商模具费用',
        },
        supplierProofingAmount: {
          label: '供应商打样费用',

        },
        supplierTotalAmount: {
          label: '供应商总价格',

        },
        deliveryDays: {
          label: '交期'
        },
        onlineTime: {
          label: '上线时间',type:'date',     width: 110
        },
        transportWay: {
          label: '运输方式',
          type: 'radio',
          items: [
            {value: 0, text: '供方承担'},
            {value: 1, text: '需方自提',tagType:'danger'}
          ]
        },
        taxInclusive: {
          label: '含税价',
          type: 'radio',
          items: [
            {value: 0, text: '不含税'},
            {value: null, text: '不含税'},
            {value: 1, text: '含税' ,tagType:'danger'}
          ]
        },
        paymentCycle: {
          label: '供应商付款周期'
        },
        remark: {
          label: '备注'
        },

        recommendDesc: {
          label: '推荐理由'
        },
        status: {
          label: '状态',
          type: 'radio',
          items: [
            {value: 0, text: '询价完成',tagType: 'info'},
            {value: 1, text: '财务不通过',tagType:'danger'},
            {value: 2, text: '财务通过',tagType: 'success'}
          ]
        },
        annexFile: {
          label: '附件'
        },
        financeApproveTime: {
          label: '财务审核时间'
        },
        financeApproveDesc: {
          label: '财务建议'
        },
        financeApproveStatus: {
          label: '财务审核状态'
        },
        financeUser: {
          label: '财务审核人员'
        },

      }
    }
  },
  components: {
    tableView,
    AddOrUpdate
  }
}
</script>
